import React from 'react';
import { useSelector } from 'react-redux'

const Index = () => {
  const list = useSelector(state => state.list);

  return (
    <div>
      {
        list.map((v, i) => {
          return <div key={i}>
            <span>姓名：{v.name}</span>
            <span>年龄：{v.age}</span>
            <span>性别：{v.sex}</span>
          </div>
        })
      }
    </div>  
  )

}


export default Index